/**
*@author       wuwg
*@createTime   2018/03/20
*@updateTime   2018/04/18
*@description
*@rule
 */
@import '../../../config/config.less';
@import '../../../mixins/select-item/index.less';
@import '../../../mixins/clearfix/index.less';
@import "../../../mixins/button/index";

@css-prefix-transfer: ~"@{css-prefix}transfer";
@css-prefix-transfer-item: ~"@{css-prefix}transfer-list-content-item";
@css-prefix-btn: ~"@{css-prefix}btn";

.@{css-prefix-transfer} {
  position: relative;
  line-height: @line-height-base;

  &-list {
    display: inline-block;
    width: 180px;
    height: 210px;
    font-size: @font-size-small;
    vertical-align: middle;
    position: relative;
    padding-top: 35px;

    &-with-footer {
      padding-bottom: 35px;
    }

    &-header {
      padding: 8px 16px;
      background: @head-bg;
      color: @text-color;
      border: 1px solid @border-color-base;
      border-bottom: 1px solid @border-color-split;
      border-radius: @border-radius-base @border-radius-base 0 0;
      overflow: hidden;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;

      &-title {
        cursor: pointer;
      }

      &>span {
        padding-left: 4px;
      }

      &-count {
        margin: 0 !important;
        float: right;
      }
    }

    &-body {
      height: 100%;
      border: 1px solid @border-color-base;
      border-top: none;
      border-radius: 0 0 @border-radius-base @border-radius-base;
      position: relative;
      overflow: hidden;

      &-with-search {
        padding-top: 34px;
      }

      &-with-footer {
        border-radius: 0;
      }
    }

    &-content {
      height: 100%;
      padding: 4px 0;
      overflow: auto;

      &-item {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;

        &>span {
          padding-left: 4px;
        }
      }

      &-not-found {
        display: none;
        text-align: center;
        color: @btn-disable-color;
      }

      li&-not-found:only-child {
        display: block;
      }
    }

    &-body-with-search &-content {
      padding: 6px 0 0;
    }

    &-body-search-wrapper {
      padding: 8px 8px 0;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
    }

    &-search {
      position: relative;
    }

    &-footer {
      border: 1px solid @border-color-base;
      border-top: none;
      border-radius: 0 0 @border-radius-base @border-radius-base;
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;

      .clearfix();
    }
  }

  &-operation {
    display: inline-block;
    overflow: hidden;
    margin: 0 16px;
    vertical-align: middle;

    &-btn {
      .button-size(@btn-padding-small; @btn-font-size; @btn-border-radius-small);
    }

    .@{css-prefix-btn} {
      display: block;
      min-width: @btn-circle-size-small;

      &:first-child {
        margin-bottom: 12px;
      }
    }
  }

  &-fake-checkbox {
    border-radius: 3px;
    display: inline-block;
    width: 14px;
    height: 14px;
    position: relative;
    border: 1px solid #dddee1;
    background-color: #fff;
    transition: .3s ease-in-out;
    vertical-align: text-bottom;
    cursor: pointer;

    &-active {
      border-color: #3399ff;
      background-color: #3399ff;

      &::before {
        content: "";
        display: table;
        width: 4px;
        height: 8px;
        position: absolute;
        top: 1px;
        left: 4px;
        border: 2px solid #fff;
        border-top: 0;
        border-left: 0;
        -webkit-transform: rotate(45deg) scale(1);
        transform: rotate(45deg) scale(1);
        -webkit-transition: all 0.2s ease-in-out;
        transition: all 0.2s ease-in-out;
      }
    }

    &-disabled {
      cursor: not-allowed;
      border-color: #dddee1;
      background-color: #f3f3f3;
    }
  }
}

.select-item(@css-prefix-transfer, @css-prefix-transfer-item);
